package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "contacts", schema = "boot", catalog = "")
//客户联系人表
public class Contacts {
    //联系人
    private int cId;//客户联系人id
    private Kehu kId;//客户id
    private String cName;//客户联系人名字
    private Long cMphone;//客户移动电话
    private String cFenl;//客户联系人分类
    private String cSex;//性别
    private String cFzyw;//负责业务
    //联系方式
    private Long cWphone;//客户工作电话
    private String cYoujdizhi;//邮政地址
    private Long cPhone;//客户手机2
    private Long cJphone;//家庭电话
    private Integer cYoub;//客户邮编
    private String cCzhen;//传真
    private String cSheng;//省
    private String cShi;//市
    private String cQu;//区
    private String cHomed;//详细地址
    //网络联系方式
    private String cWX;//微信
    private Long cQQ;//QQ
    private String cWXnc;//微信昵称
    private String cQQnc;//QQ昵称
    private String cWangw;//旺旺
    private Timestamp cCjjian;//创建时间
    private Timestamp cGxjian;//更新时间
    private int cZtai;//状态

    public Contacts() {
    }

    public Contacts(String cName, Long cMphone, String cSheng, String cShi, String cQu, String cHomed,
        Kehu kId,Timestamp cCjjian,int cZtai) {
        this.cName = cName;
        this.cMphone = cMphone;
        this.cSheng = cSheng;
        this.cShi = cShi;
        this.cQu = cQu;
        this.cHomed = cHomed;
        this.kId = kId;
        this.cCjjian = cCjjian;
        this.cZtai = cZtai;
    }

    @Id
    @Column(name = "c_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getcId() {
        return cId;
    }

    public void setcId(int cId) {
        this.cId = cId;
    }


    //多个联系人对应一个客户
    @ManyToOne
    @JoinColumn(name = "k_id", nullable = true)
    public Kehu getkId() {
        return kId;
    }

    public void setkId(Kehu kId) {
        this.kId = kId;
    }

    @Basic
    @Column(name = "c_sheng", nullable = true, length = 255)
    public String getcSheng() {
        return cSheng;
    }

    public void setcSheng(String cSheng) {
        this.cSheng = cSheng;
    }

    @Basic
    @Column(name = "c_shi", nullable = true, length = 255)
    public String getcShi() {
        return cShi;
    }

    public void setcShi(String cShi) {
        this.cShi = cShi;
    }

    @Basic
    @Column(name = "c_qu", nullable = true, length = 255)
    public String getcQu() {
        return cQu;
    }

    public void setcQu(String cQu) {
        this.cQu = cQu;
    }

    @Basic
    @Column(name = "c_name", nullable = true, length = 255)
    public String getcName() {
        return cName;
    }

    public void setcName(String cName) {
        this.cName = cName;
    }

    @Basic
    @Column(name = "c_wphone", nullable = true)
    public Long getcWphone() {
        return cWphone;
    }

    public void setcWphone(Long cWphone) {
        this.cWphone = cWphone;
    }

    @Basic
    @Column(name = "c_mphone", nullable = true)
    public Long getcMphone() {
        return cMphone;
    }

    public void setcMphone(Long cMphone) {
        this.cMphone = cMphone;
    }

    @Basic
    @Column(name = "c_phone", nullable = true)
    public Long getcPhone() {
        return cPhone;
    }

    public void setcPhone(Long cPhone) {
        this.cPhone = cPhone;
    }

    @Basic
    @Column(name = "c_youjdizhi", nullable = true, length = 255)
    public String getcYoujdizhi() {
        return cYoujdizhi;
    }

    public void setcYoujdizhi(String cYoujdizhi) {
        this.cYoujdizhi = cYoujdizhi;
    }

    @Basic
    @Column(name = "c_fenl", nullable = true, length = 255)
    public String getcFenl() {
        return cFenl;
    }

    public void setcFenl(String cFenl) {
        this.cFenl = cFenl;
    }

    @Basic
    @Column(name = "c_sex", nullable = true, length = 255)
    public String getcSex() {
        return cSex;
    }

    public void setcSex(String cSex) {
        this.cSex = cSex;
    }

    @Basic
    @Column(name = "c_fzyw", nullable = true, length = 255)
    public String getcFzyw() {
        return cFzyw;
    }

    public void setcFzyw(String cFzyw) {
        this.cFzyw = cFzyw;
    }

    @Basic
    @Column(name = "c_jphone", nullable = true)
    public Long getcJphone() {
        return cJphone;
    }

    public void setcJphone(Long cJphone) {
        this.cJphone = cJphone;
    }

    @Basic
    @Column(name = "c_youb", nullable = true)
    public Integer getcYoub() {
        return cYoub;
    }

    public void setcYoub(Integer cYoub) {
        this.cYoub = cYoub;
    }

    @Basic
    @Column(name = "c_czhen", nullable = true, length = 255)
    public String getcCzhen() {
        return cCzhen;
    }

    public void setcCzhen(String cCzhen) {
        this.cCzhen = cCzhen;
    }

    @Basic
    @Column(name = "c_homed", nullable = true, length = 255)
    public String getcHomed() {
        return cHomed;
    }

    public void setcHomed(String cHomed) {
        this.cHomed = cHomed;
    }

    @Basic
    @Column(name = "c_wx", nullable = true, length = 255)
    public String getcWX() {
        return cWX;
    }


    public void setcWX(String cWX) {
        this.cWX = cWX;
    }

    @Basic
    @Column(name = "c_qq", nullable = true)
    public Long getcQQ() {
        return cQQ;
    }

    public void setcQQ(Long cQQ) {
        this.cQQ = cQQ;
    }

    @Basic
    @Column(name = "c_wxnc", nullable = true, length = 255)
    public String getcWXnc() {
        return cWXnc;
    }

    public void setcWXnc(String cWXnc) {
        this.cWXnc = cWXnc;
    }

    @Basic
    @Column(name = "c_qqnc", nullable = true, length = 255)
    public String getcQQnc() {
        return cQQnc;
    }

    public void setcQQnc(String cQQnc) {
        this.cQQnc = cQQnc;
    }

    @Basic
    @Column(name = "c_wangw", nullable = true, length = 255)
    public String getcWangw() {
        return cWangw;
    }

    public void setcWangw(String cWangw) {
        this.cWangw = cWangw;
    }

    @Basic
    @Column(name = "c_ztai", nullable = true)
    public int getcZtai() {
        return cZtai;
    }

    public void setcZtai(int cZtai) {
        this.cZtai = cZtai;
    }

    @Basic
    @Column(name = "c_cjjian", nullable = false)
    public Timestamp getcCjjian() {
        return cCjjian;
    }

    public void setcCjjian(Timestamp cCjjian) {
        this.cCjjian = cCjjian;
    }

    @Basic
    @Column(name = "c_gxjian", nullable = false)
    public Timestamp getcGxjian() {
        return cGxjian;
    }

    public void setcGxjian(Timestamp cGxjian) {
        this.cGxjian = cGxjian;
    }

    @Override
    public String toString() {
        return "Contacts{" +
                "cId=" + cId +
                ", kId=" + kId +
                ", cName='" + cName + '\'' +
                ", cMphone=" + cMphone +
                ", cFenl='" + cFenl + '\'' +
                ", cSex='" + cSex + '\'' +
                ", cFzyw='" + cFzyw + '\'' +
                ", cWphone=" + cWphone +
                ", cYoujdizhi='" + cYoujdizhi + '\'' +
                ", cPhone=" + cPhone +
                ", cJphone=" + cJphone +
                ", cYoub=" + cYoub +
                ", cCzhen='" + cCzhen + '\'' +
                ", cHomed='" + cHomed + '\'' +
                ", cWX='" + cWX + '\'' +
                ", cQQ=" + cQQ +
                ", cWXnc='" + cWXnc + '\'' +
                ", cQQnc='" + cQQnc + '\'' +
                ", cWangw='" + cWangw + '\'' +
                '}';
    }
}
